<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>登录</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

</head>

<body>
	<form method="post" id="login" action="<%=basePath%>LoginServlet">
		<%
			if (session.getAttribute("name") == null) {
		%>
		<table width="230" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td width="90" height="40" align="left" style="font-size: 12px">用户名</td>
				<td width="140"><input type="text" name="name" id="name" width="100" />
				</td>
			</tr>
			<tr>
				<td height="40" height="40" align="left" style="font-size: 12px">密码</td>
				<td width="140"><input type="password" name="pwd" id="pwd" width="100" size="22" />
				</td>
			</tr>
			<tr>
				<td><input type="submit" value="登录" /></td>
			</tr>
			<tr>
				<td><a href="<%=basePath%>Test.jsp">测试</a></td>
			</tr>
			<tr>
				<td><a href="<%=basePath%>LogoutServlet">退出</a></td>
			</tr>
		</table>
		<%
			} else {
		%>
		已登陆
		<%
			}
		%>
	</form>
</body>
</html>
